<?php

$kabupaten = getKab();

if ($kabupaten) {
	
	$o .= '<table class="table table-striped table-bordered table-condensed">
			<tr>
				<td><center>No</td>
				<td><center>Kabupaten</td>
				<td><center>Luas Wilayah</td>
				<td><center>Longitude</td>
				<td><center>Lattitude</td>
				<td><center>Action</td>
			</tr>
	
		  ';
	
	$no = 1;
	
	foreach($kabupaten as $x) {
		
		$o .= '<tr>
					<td><center>'.$no.'</td>
					<td><center>'.$x['nama_kabkota'].'</td>
					<td><center>'.$x['luas_wilayah'].'</td>
					<td><center>'.$x['long'].'</td>
					<td><center>'.$x['lat'].'</td>
					<td><center><a href="?page=listkegiatan&idkabkota='.$x['idkabkota'].'"><i class="icon-edit"></i> lihat kegiatan</a></td>
			  </tr>';
			  
		$no++;
		
	}

	$o .= '</table>';

} else {

	$o .= '<div class="alert alert-error">
		  <center>Data kosong</center>
		  </div>';
} 

echo $o;
